<template>
    <div v-if="tkIsShow">
        <div class="zhezhao"></div>
        <div class="tankuang">
            <div class="tk_title">{{ title }}</div>
            <img src="../assets/icon-close.png" class="tk_close" @click="closeTk">
            <div class="tk_content">
                <div class="input_title">需要退款的金额</div>
                <div class="tk_tips">
                    <el-input type="number" v-model="inputValue" placeholder="请输入内容"
                    :min="0"
                    :step="0.01"
                    @input="handleInput"></el-input>
                </div>
                <div style="margin-top: 20px;">
                    <el-row>
                        <el-button @click="closeTk">取消</el-button>
                        <el-button type="primary" @click="confirmTk">确定</el-button>
                    </el-row>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
        tkIsShow:false,
        title:"",
        inputValue:""
    };
  },
  methods: {
    closeTk(){
        this.tkIsShow = false;
    },
    confirmTk(){
        this.$emit("confirmTip",this.inputValue);
        this.inputValue = "";
        this.tkIsShow = false
    },
  }
}
</script>
<style scoped lang="scss">
  .zhezhao{
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #000;
    opacity: 0.2;
    top: 0;
    left: 0;
    z-index: 500;
  }
  .tankuang{
    position: fixed;
    width: 20%;
    height: 200px;
    background-color: #fff;
    top: 20%;
    left: 40%;
    z-index: 501;
    border-radius: 5px;
  }
  .tk_title{
    font-size: 18px;
    margin: 15px 0;
    height: 25px;
    line-height: 25px;
  }
  .tk_content{
    width: 90%;
    margin-left: 5%;
    height: calc(100% - 55px);
  }
  .tk_close{
    position: absolute;
    width: 16px;
    height: 16px;
    top: 18px;
    right: 20px;
  }
  .tk_tips{
    margin-top: 15px;
    width: 100%;
    display: inline-block;
  }
  .input_title{
    float: left;
    color: #666;
  }
</style>